package top.zhangjianyong.blog.params.user;

import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

/**
 * 用户技能保存或更新参数
 *
 * @author zhangjianyong
 * @since 2024/7/1
 */
public record UserSkillSaveOrUpdateParam(
    Long id,
    @NotNull(message = "用户ID不能为空") Long userId,
    @NotBlank(message = "技能名称不能为空") String skillName,
    @NotNull(message = "技能等级不能为空")
        @Min(value = 0, message = "技能等级不能小于0")
        @Max(value = 100, message = "技能等级不能大于100")
        Integer skillLevel,
    String skillColor,
    String skillDescription,
    Integer sortOrder) {}
